/*
 * $Id: Template.java 101 2013-01-14 12:51:21Z vladimirow@mail.ru $
 * $HeadURL: http://ultralog.googlecode.com/svn/ultralog/tags/release-0.1/src/java/com/google/code/ultralog/template/Template.java $
 *
 * This file is a part of ultralog project (http://code.google.com/p/ultralog/).
 * Released under New BSD License.
 */
package com.google.code.ultralog.template;

/**
 * Represents log message template.
 *
 * @author Mikhail Vladimirov
 */
public interface Template
{
    /**
     * Get number of placeholders in the template.
     *
     * @return number of placeholders in the template
     */
    public int getPlaceholderCount ();

    /**
     * Get literal at given position.
     *
     * @param position literal position
     * @return literal at given position
     */
    public String getLiteralAt (int position);

    /**
     * Get placeholder at given position.
     *
     * @param position placeholder position
     * @return placeholder at given position
     */
    public Placeholder getPlaceholderAt (int position);

    /**
     * Represents placeholder entry in template.
     */
    public interface Placeholder
    {
        /**
         * Get placeholder name.
         *
         * @return placeholder name
         */
        public String getName ();

        /**
         * Get placeholder options.
         *
         * @return placeholder options
         */
        public String getOptions ();
    }
}
